package copyx

import "errors"

func DeepCopy[T any](t any) (T, error) {
	if t2, ok := t.(T); ok {
		return t2, nil
	}
	var tt T
	return tt, errors.New("copy err")
}
